package com.jt.factory;

import org.springframework.beans.factory.FactoryBean;

import java.util.Calendar;

public class CalenderFactory  implements FactoryBean<Calendar> {
    @Override
    public Calendar getObject() throws Exception {
        System.out.println("工厂模式调用,实例化方法");
        return Calendar.getInstance();
    }

    @Override
    public Class<?> getObjectType() {

        return Calendar.class;
    }
}
